﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrainigWorkshop.Model;


namespace TrainigWorkshop.DAL_EF.ModelTranslation
{
    class StudentModelTranslator
    {
        public static Student ToStudentEF(StudentModel studentModel)
        {
            Student studentEF = new Student();
            studentEF.StudentId = studentModel.StudentId;
            studentEF.StudentName = studentModel.StudentName;
            studentEF.StudentGender = studentModel.StudentGender;
            studentEF.ClassId = studentModel.grades.ClassId;
            return studentEF;
        }

        public static void ToStudentEF(StudentModel studentModel, Student studentEF)
        {
            studentEF.StudentId = studentModel.StudentId;
            studentEF.StudentName = studentModel.StudentName;
            studentEF.StudentGender = studentModel.StudentGender;
            studentEF.ClassId = studentModel.grades.ClassId;
        }
    }

}
